﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using SmartRS.com.vn.smartrs.domain;
using SmartRS.com.vn.smartrs.dao;

namespace SmartRS.com.vn.smartrs.form.uC
{
    public partial class ucHallDesk : UserControl
    {
        List<Hall> listHall { get; set; }
        List<Desk> listDesk { get; set; }
        public long deskId { get; private set; }
        public ucHallDesk()
        {
            InitializeComponent();
        }

        public ucHallDesk(List<Hall> lstHall)
        {
            this.listHall = lstHall;
        }

        public void setValue(List<Hall> listHall)
        {
            if (listHall == null || listHall.Count <= 0) { return; }
            this.listHall = listHall;

            cboHall.DataSource = listHall;
            cboHall.DisplayMember = HallDao.HALL_NAME;
            cboHall.ValueMember = HallDao.HALL_ID;
            cboHall.SelectedItem = cboHall.Items[0];
        }

        private void cboHall_SelectedIndexChanged(object sender, EventArgs e)
        {
            //long hallId = int.Parse(cboHall.SelectedValue.ToString());


        }
    }
}
